let app = new Vue({
	el: "#main-content",
	data:{
		getList1:""
	},
	created() {
		this.getList();
	},
	methods:{
		getList(pageNum){
			console.log(1);
			if(pageNum>0){
				this.pageNum1=pageNum;
			}
			let data = new URLSearchParams;
			data.append("pageNum",1);
			data.append("pageSize",3);
			data.append("zhuangtai",2);
			axios({
				url : "cangku/goodsDetailAll",
				method : "post",
				data : data,
				headers:{"token":localStorage.token,"url":window.location.pathname}
			}).then(response=>{
				this.getList1=response.data.data;
				console.log(this.getList1);
			})
		},
		xiugai(id,status){
			let data = new URLSearchParams;
			data.append("id",id);
			data.append("status",status);
			axios({
				url : "cangku/updataStatus1",
				method : "post",
				data : data,
				headers:{"token":localStorage.token,"url":window.location.pathname}
			}).then(response=>{
				this.getList1=response.data.data;
				console.log(this.getList1);
				this.getList();
			})
		}
	}
})